package com.thrd.taiexhibition;

import android.accessibilityservice.AccessibilityService;
import android.util.Log;
import android.view.accessibility.AccessibilityEvent;

public class MyService extends AccessibilityService {
    private static final String TAG="MyService";
    @Override
    public void onAccessibilityEvent(AccessibilityEvent event) {
        if(event.getEventType() == AccessibilityEvent.TYPE_VIEW_CLICKED){
            Log.v(TAG,"View被点击了");
            Log.v(TAG,"我点击了:"+event.getText());
            Log.v(TAG,"当前应用的包名是:"+event.getPackageName()+event.getClassName());
        }
    //    Log.v(TAG,"DeltaX="+event.getScrollDeltaX());
        Log.v(TAG,"MaxX="+event.getMaxScrollX());
        Log.v(TAG,"ScrollX="+event.getScrollX());

    }

    @Override
    public void onInterrupt() {

    }
}
